﻿Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim cn As New Meta.Numerics.Complex
        'Dim res As String = Meta.Numerics.Functions.AdvancedIntegerMath.LogDoubleFactorial("122")
        'Dim res2 As String = Meta.Numerics.Functions.AdvancedIntegerMath.IsPrime("1111111111111111111111111111111111")
        'MsgBox(res2) ' test3

        Dim bi1 As New System.Numerics.BigInteger
        Dim bi2 As New System.Numerics.BigInteger
        System.Numerics.BigInteger.TryParse("1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111113", bi1)
        System.Numerics.BigInteger.TryParse("211111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", bi2)
        Dim bi3 As System.Numerics.BigInteger = bi1 + bi2
        Dim bi4 As System.Numerics.BigInteger
        System.Numerics.BigInteger.TryParse("3", bi3)
        Dim dbl As Double = 2.2
        bi4 = System.Numerics.BigInteger.Pow(bi3, dbl)


        'bi3 = System.Numerics.BigInteger.Add(bi1, bi1)
        'System.Numerics.BigInteger.


        TextBox1.Text &= System.Numerics.BigInteger.Log(bi1).ToString
        TextBox1.Text &= vbCrLf
        TextBox1.Text &= vbCrLf

        TextBox1.Text &= bi4.ToString
        TextBox1.Text &= vbCrLf
        TextBox1.Text &= vbCrLf
        TextBox1.Text &= dbl.ToString
        TextBox1.Text &= vbCrLf
        TextBox1.Text &= vbCrLf
        TextBox1.Text &= (3 ^ 2.2).ToString
        TextBox1.Text &= vbCrLf
        TextBox1.Text &= vbCrLf
        TextBox1.Text &= (3 ^ 22).ToString
        'System.Numerics.BigInteger.
        'For i As Integer = 1 To 3
        '    bi3 = System.Numerics.BigInteger.Pow(bi3, 10.3)
        '    TextBox1.Text &= vbCrLf
        '    TextBox1.Text &= vbCrLf
        '    TextBox1.Text &= bi3.ToString

        'Next

        'MsgBox(bi3.ToString)
        Dim pi As New Pi
        MsgBox(pi.FindPi(30))
    End Sub


End Class
